<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        var obj = {
			'0':'yang',
			'1':'a',
			'2':'b',
			'length':3,
			'push':Array.prototype.push,
			'splice':Array.prototype.splice,
			'slice':Array.prototype.slice//可以通过空截 将类数组转换成数组
		}

		// //类数组的push原理
       
		Array.prototype.push = function () {
			for(var i = 0;i < arguments.length;i ++) {
				this[this.length] = arguments[i];
				this.length ++;
			}
			return this.length;
		}

    </script>
</body>
</html>